package com.ls.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 企业
 * </p>
 *
 * @author pengyu
 * @since 2024-10-12
 */
@NoArgsConstructor
@Data
@EqualsAndHashCode(callSuper = false)
public class Company extends Model<Company> {
    private static final long serialVersionUID=1L;
    /**
     * 自增主键
     */
    @TableId(value = "company_id", type = IdType.AUTO)
    private Long companyId;
    /**
     * 公司名称
     */
    private String companyName;
    /**
     * 用户id
     */
    private Long customerId;
    /**
     * 用户手机号
     */
    private String phone;
    /**
     * 省
     */
    private String province;
    /**
     * 市
     */
    private String city;
    /**
     * 区
     */
    private String district;
    /**
     * 地址
     */
    private String address;
    /**
     * 行业名称
     */
    private String tradeName;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
    /**
     * 创建人id
     */
    private Long creatorId;
    /**
     * 修改人id
     */
    private Long updaterId;
    @Override
    protected Serializable pkVal() {
        return this.companyId;
    }
}
